import service from '../utils/request.js'; // 引入二次封装的 axios

// 资讯分类管理
export const addInfoCategory = (infoCategory) => {
    return service.post('/api/admin/infoCategory/add', infoCategory);
};

export const deleteInfoCategoryById = (id) => {
    return service.post(`/api/admin/infoCategory/delete/${id}`);
};

export const getInfoCategoryById = (id) => {
    return service.get(`/api/admin/infoCategory/detail/${id}`);
};

export const pageInfoCategory = (params) => {
    return service.post('/api/admin/infoCategory/list', params);
};

export const updateInfoCategory = (infoCategory) => {
    return service.post('/api/admin/infoCategory/update', infoCategory);
};